<h1>New reservation</h1>


<% form_for([@client, @reservation]) do |f| %>
  <%= f.error_messages %>

	<h2>client</h2>
    <p>
      Nom: <%= @client.nom %><br />
    </p>
    <p>
			Prenom: <%= @client.prenom %><br />
    </p>
	
	<h2>réservation</h2>
  <%= render :partial => "form", :locals=>{:f => f} %>

	<h2>Listing chambres libres</h2>
	<table>
	  <tr>
			<th>ID</th>
	    <th>Numero</th>
	    <th>Status</th>
	  </tr>

	<% for chambre in @chambres %>
	  <tr>
			<td><%=h chambre.id %></td>
	    <td><%=h chambre.numero %></td>
	    <td><%=h chambre.status %></td>
		</tr>
	<% end %>
	<%= will_paginate(@chambres) %>
	</table>
	
	<p>
    Chambre ID: <%= f.text_field :chambre_id %><br />
  </p>
	
  <p>
    <%= f.submit "Create" %>
  </p>
<% end %>


<%= link_to 'Back', client_reservations_path(@client) %>